<?php

declare(strict_types=1);

namespace App\Common;

use Hyperf\Validation\Request\FormRequest;

class BaseRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    /**
     * @param $name
     * @return array|false|mixed|null
     */
    public function __get($name)
    {
        return $this->input($name);
    }

    /**
     * @param $name
     * @return bool
     */
    public function __isset($key)
    {
        if (null === $this->__get($key)) {
            return false;
        }
        return true;
    }
}